The Slider Component > FSlider.setSnapToTicks() |
FSlider.setSnapToTicks()
Availability
Flash Player 6.
Usage
mySlider_sld.setSnapToTicks (snap)
Parameters
snap Boolean value which indicates whether the thumb button on the slide
should snap to the closest tick (true) or move freely (false).
Returns
Nothing
Description
Specifies whether the thumb (and the data value it represents) resolves
to the closest tick mark where the user positioned the thumb. The default value
for this is false.
Example
The slider_getSnapToTicks.fla example file contains an example of using this method.
The following code sets the number of tick marks, sets the ticks to display on top and then turns snapping on.
mySlider_sld.setSliderProperties(0,50);
mySlider_sld.setTickFrequency(6);
mySlider_sld.setTickStyle("top");
mySlider_sld.setSnapToTicks(true);
See also